<?php
/**
 * 入口文件
 *
 * 统一入口，进行初始化信息
 */ 
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);  
define('BASE_ROOT_PATH',str_replace('\\','/',dirname(__FILE__)));
define('BASE_CORE_PATH',BASE_ROOT_PATH.'/core');
define('BASE_DATA_PATH',BASE_ROOT_PATH.'/data');
define('DS','/');
define('InAiteSoft',true);
define('StartTime',microtime(true));
define('TIMESTAMP',time());
define('DIR_SHOP','mall');
define('DIR_CMS','news');
define('DIR_CIRCLE','sns');
define('DIR_MICROSHOP','hao');
define('DIR_ADMIN','aitemanger');
define('DIR_API','api');
define('DIR_MOBILE','mobile');
define('DIR_WAP','wap');

define('DIR_RESOURCE','data/resource');
define('DIR_UPLOAD','data/upload');
define('DIR_UPLOAD_VIDEO','video');


define('ATTACH_PATH','shop');
define('ATTACH_COMMON','shop/common');
define('ATTACH_BILL','shop/bill');
define('ATTACH_AVATAR','shop/avatar');
define('ATTACH_EDITOR','shop/editor');
define('ATTACH_MEMBERTAG','shop/membertag');
define('ATTACH_STORE','shop/store');
define('ATTACH_GOODS','shop/store/goods');
define('ATTACH_STORE_DECORATION','shop/store/decoration');
define('ATTACH_LOGIN','shop/login');
define('ATTACH_WAYBILL','shop/waybill');
define('ATTACH_ARTICLE','shop/article');
define('ATTACH_BRAND','shop/brand');
define('ATTACH_ADV','shop/adv');
define('ATTACH_ACTIVITY','shop/activity');
define('ATTACH_WATERMARK','shop/watermark');
define('ATTACH_POINTPROD','shop/pointprod');
define('ATTACH_GROUPBUY','shop/groupbuy');
define('ATTACH_LIVE_GROUPBUY','shop/livegroupbuy');
define('ATTACH_SLIDE','shop/store/slide');
define('ATTACH_VOUCHER','shop/voucher');
define('ATTACH_STORE_JOININ','shop/store_joinin');
define('ATTACH_MOBILE','mobile');
define('ATTACH_CIRCLE','circle');
define('ATTACH_CMS','cms');
define('ATTACH_LIVE','live');
define('ATTACH_CMS_ARTICLE',ATTACH_CMS . '/article');
define('ATTACH_MALBUM','shop/member');
define('ATTACH_MICROSHOP','microshop');
define('ATTACH_NOTE','microshop/note');
define('ATTACH_NOTE_IMAGE','microshop/note/image');
define('ATTACH_NOTE_VIDEO','microshop/note/video');
define('ATTACH_TOPIC','microshop/topic');
define('ATTACH_TOPIC_CLASS','microshop/topic_class');
define('SHOP_TPL_DIR',BASE_ROOT_PATH.'/mall/templates/');
define('TPL_SHOP_NAME','default');
define('TPL_CIRCLE_NAME', 'default');
define('TPL_MICROSHOP_NAME', 'default');
define('TPL_CMS_NAME', 'default');
define('TPL_ADMIN_NAME', 'default');
define('ATTACH_CLASS','shop/store/class');
define('ATTACH_APP','aitemanger/app');
define('ATTACH_AEEA_FLAG_ICON','aitemanger/icon');

define('ATTACH_VIDEO','shop/video');

/*
 * 商家入驻状态定义
 */
//新申请
define('STORE_JOIN_STATE_NEW', 10);
//完成付款
define('STORE_JOIN_STATE_PAY', 11);
//初审成功
define('STORE_JOIN_STATE_VERIFY_SUCCESS', 20);
//初审失败
define('STORE_JOIN_STATE_VERIFY_FAIL', 30);
//付款审核失败
define('STORE_JOIN_STATE_PAY_FAIL', 31);
//开店成功
define('STORE_JOIN_STATE_FINAL', 40);

//默认颜色规格id(前台显示图片的规格)
define('DEFAULT_SPEC_COLOR_ID', 1);


/**
 * 商品图片
 */
define('GOODS_IMAGES_WIDTH', '60,240,360,1280');
define('GOODS_IMAGES_HEIGHT', '60,240,360,12800');
define('GOODS_IMAGES_EXT', '_60,_240,_360,_1280');

/**
 *  订单状态
 */
//已取消
define('ORDER_STATE_CANCEL', 0);
//已产生但未支付
define('ORDER_STATE_NEW', 10);
//已支付
define('ORDER_STATE_PAY', 20);
//已发货
define('ORDER_STATE_SEND', 30);
//已收货，交易成功
define('ORDER_STATE_SUCCESS', 40);
//未支付关闭订单 单位分
define('ORDER_AUTO_CANCEL_DAY', 30);
//未支付关闭订单秒数
define('ORDER_AUTO_CANCEL_SECOND', 60);
//已签收
define('ORDER_SIGN', 35);
//已付定金
define('ORDER_STATE_EARNEST', 15);
//发货后确认收货时间 单位天
//define('ORDER_AUTO_RECEIVE_DAY', 15);
define('ORDER_AUTO_RECEIVE_DAY', 7);//默认7天收货


/** 订单删除状态 */
//默认未删除
define('ORDER_DEL_STATE_DEFAULT', 0);
//已删除
define('ORDER_DEL_STATE_DELETE', 1);
//彻底删除
define('ORDER_DEL_STATE_DROP', 2);
//订单结束后可评论时间，15天，60*60*24*15
define('ORDER_EVALUATE_TIME', 1296000);
/**  团购订单状态 */
define('OFFLINE_ORDER_CANCEL_TIME', 3);//单位为天

define('API_APPKEY','ANHK78451ERFG17'); //APP端接口授权key
define('API_APPLETKEY','LET78451EHMG63'); //小程序端接口授权key
define('API_WAPKEY','AWAP78851ERFG85'); //WAP端接口授权key

